						
<!DOCTYPE html>
<html lang="zh-cn">
	<head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
	    <title></title>
	    <#include "/common/meta.ftl"/>
	    <#include "/common/form.ftl"/>
		<script>
			$(function(){
				$("#cbAll").click(function(){
					$(".CK").prop('checked',$("#cbAll").prop('checked'));
				});
				$("#table").height($(window).height() - 10);
				$("#dictItemIframe").height($(window).height() - 10);
				
				var id = $(".active").attr("id");
				$("#dictItemIframe").attr("src" , "./"+id+"/dictItemList");
			});
			function hasChecked(){
				var cbs = $(".CK");
				for(var i=0;i<cbs.length;i++){
					if(cbs[i].checked == true){
						return true;
					}
				}
				return false;
			}
			function plDelete(){
				if(!hasChecked()){
					alert("请勾选您要删除的数据！");
				}else{
					if(confirm("您确定要删除这些数据吗？")){
						var cbs = $(".CK");
						var ids = "";
						for(var i=0;i<cbs.length;i++){
							if(cbs[i].checked == true){
								ids += cbs[i].value + ",";
							}
						}
						ids = ids.substring(0,ids.length-1);
						location.href = "./sysDictDelete?ids="+ids;
					}
					
				}
			}
			function add(){
				location.href = "./sysDictForm";
			}
			function edit(id){
				location.href = "./sysDictForm?dictid=" + id;
			}
			function exportExcel(){
				top.openMessager("您确定要导出当前结果集吗？","",true,function(){
					var url = "./sysDictExport?"+ $("form").serialize();
					top.$("#exportIframe").attr("src", url);
				});
			}
			function setOrder(orderColumn, isAsc){
				$("#orderField").val(orderColumn);
				$("#isAsc").val(isAsc);
				$("#sysDictListForm").submit();
			}
			function refresh(){
				location.reload();
			}
			function itemList(id){
				$(".list-group-item").removeClass("active");
				//
				$("#" + id).addClass("active");
				$("#dictItemIframe").attr("src" , "./"+id+"/dictItemList");
			}
		</script>
	</head>
	<body style="padding:5px;overflow:hidden;">
		<table class="table table-bordered" id="table">
			<tr>
				<td style="width:250px;padding:3px;">
					<div class="list-group">
						<#list data.records as x>
					  		<a id="${x.dictId}" href="javascript:itemList('${x.dictId}')" class="list-group-item <#if x_index==0>active</#if>">
					  			${x.dictName!''}（${x.dictKey!''}）
					  		</a>
					  	</#list>
					</div>
					<script type="text/javascript">
						
					</script>
				</td>
				<td style="padding:0px;">
					<iframe id="dictItemIframe" name="dictItemIframe" src="" frameborder=0 style="height:100%;width:100%;"></iframe>
				</td>
			</tr>
		</table>
	</body>
</html>